<?php

use Illuminate\Routing\Router;

Route::group([
    'prefix' => 'admin/contentCategory',
    'namespace' => 'Frieza\\Modules\\ContentCategory\\Controllers',
    'middleware' => [
        'web',
        'admin'
    ],
], function (Router $router) {

    $router->get('dimension/index', 'DimensionController@index');//维度列表
    $router->get('dimension/index/create', 'DimensionController@add');//添加维度
    $router->post('dimension/index/save', 'DimensionController@editSubmit');//添加维度提交

    $router->get('category/index', 'CategoryController@index');//分类列表
    $router->get('category/index/create', 'CategoryController@add');//添加分类
    $router->post('category/index/save', 'CategoryController@editSubmit');//添加分类提交

    $router->post('category/setmark', 'CategoryController@setMark')->name('category.mark'); //标记分类

    $router->get('categoryMap', 'CategoryMapController@index'); // 前后台分类映射关系首页
    $router->get('categoryMap/create', 'CategoryMapController@create'); // 映射关系添加
    $router->get('categoryMap/{id}/edit', 'CategoryMapController@create'); // 映射关系编辑
    $router->post('categoryMap/save', 'CategoryMapController@save'); // 映射关系执行修改
    $router->delete('categoryMap/{id}', 'CategoryMapController@delete'); // 映射关系删除

});